
	== KING ARTHUR'S GOLD SERVER SETUP INFO ==

If you want to host your own server just run the following
script from your KAG directory:
	- dedicatedserver.bat on Windows
	- dedicatedserver.sh on Linux

The default port on which the server works is 50301.
Be sure to forward this port on your firewall if need be.

On Linux:

	Set executable permissions:
	  $ chmod +x KAG
	  $ chmod +x dedicatedserver.sh
	If the executable updates, you might need to rename the
	updated file and set executable permissions again. Like this:
	  $ mv KAG.tmp KAG
	  $ chmod +x KAG

Configure your server with these config files:

	CONFIG FILE: "Base/Scripts/dedicated_autoconfig.gm"

	Some parameters worth considering:

		m_width = 290; - map width in tiles
		m_height = 110; - map height
		m_seed = 0; - map random seed
		sv_maxplayers = 32;
		sv_ip = `0`; - assign a specific IP port or leave 0
		sv_port = 50301; - port on which the server listens
		sv_rconpassword = ``; - rcon password for remote admin
		sv_name = `KAG Server`; - the name of your server
		sv_info = `I like Cheese`; - info description which appears in the servers list
		sv_gamemode = "WAR" - sets the server gamemode (uses folder names from Base/Rules)
		sv_mapcycle = "mapcycle.cfg" - sets default map cycle; leave blank to use default gamemode cycle

	AUTOSTART SCRIPT: "Base/Scripts/dedicated_autostart.as"

*Remote administration*

Make sure you set the rcon password in dedicated_autoconfig.gm (sv_rconpassword).
Open the client, join your server and open the console (HOME key).
Type "\rcon password". If you login succesfully, you can now use the console as if you are on the machine,
using the prefix "\rcon". Example: "\rcon \loadmap autosave".

Server commands:
\list - list all commands and variables
\kick [playername] [minutes]
\kickid [id] [minutes]
\kickhost [host] [minutes] - kicks and/or bans host (host number can be found in logs when player joins)
\unban [name]
\ban [name] [minutes]

\swapid [player id] - swaps the players team
\players
\restartmap
\loadmap [name]
\savemap [name]
\msg [text]
\rcon [password]
addBotX - addBotX( team, class, name ); eg. addBotX( 1, 0, `Henry` );

Command line:
	start server with specific ip,port,slots eg.
	./KAG ip 123.124.125.126 port 50213 slots 32 nolauncher autostart Scripts/dedicated_autostart.gm autoconfig Scripts/dedicated_autoconfig.gm

	These options override the config set options, which allows server hosting companies greater control over the servers.

Server stats

	Currently at format v0.1, found in Logs/PlayerStats
	Filename is Username of each player.
	Last Modified time is "last seen on server" time accurate to 5min.

	Example stats file "Henry.txt:

		v0.1 71 2 102 4 2097283264 192.0.2.125 0

	Format:
		v0.1 Kills CurrentKills Deaths CurrentDeaths HostNumber DottedIPAddress HardWareID

	HardWareID is unreliable for OSX clients (on OSX the CPU id apparently changes every reboot)
